<div class="panes_vertical">
	<div class="box">	
		<form method="post" action="<{$APPLICATION_URL}>/Admin/Users/changePassword" name="frmForm" enctype="multipart/form-data">
			<fieldset>
				<legend>Change <{$usersEntity->username}>'s password</legend>																
				<p>
					<label>Current Password:</label>
					<input type='password' id='currentPassword' name='currentPassword' value='<{$currentPassword}>' class="textfield" >					
				</p>
				<p>
					<label>New Password:</label>
					<input type="password" id='newPassword' name='newPassword' value='<{$newPassword}>' class="textfield">					
				</p>
				<p>
					<label>Retype Password:</label>
					<input type='password' id='reTypePassword' name='reTypePassword' value='<{$reTypePassword}>' class="textfield">					
				</p>				
				<p>
					<input type="button" name="save" class="button" id="save" value=" Submit " onclick="formSubmit();" />
					<input type="reset" name="reset" class="button" id="reset" value=" Reset " />										
					<input type="hidden" id="id" name="id" value="<{$id}>" />
					<input type="hidden" id="actionForm" name="actionForm" value=""/>
					<input type="hidden" id="actionKey" name="actionKey" value="<{$actionKey}>" />
				</p>
			</fieldset>
		</form>
	</div>
</div>

<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.frmForm;
    	
    	// Check Password
    	var currentPassword = theform.currentPassword.value;
    	if (currentPassword == ''){
			alert('Please enter your current password!');
			theform.currentPassword.focus();
			return false;
    	} 	

    	// Check NewPassword
    	var newPassword = theform.newPassword.value;
    	if (newPassword == ''){
			alert('Please enter your new password!');
			theform.newPassword.focus();
			return false;
    	} 	

    	// Check ReTypePassword
    	var reTypePassword = theform.reTypePassword.value;
    	if (reTypePassword == ''){
			alert('Your new password is mismatch. Please try again!');
			theform.reTypePassword.focus();
			return false;
    	} 	
    	else if(newPassword != reTypePassword)
    	{
    		alert('Your new password is mismatch. Please try again!');
			theform.reTypePassword.focus();
			return false;
    	}
    	
    	theform.actionForm.value = 'submit';
    	theform.submit();
    	return true;
    }
</script>